package com.sca.bussiness.controller;

import com.sca.bussiness.entity.api.BaseResult;
import com.sca.bussiness.service.BussinessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuxianfei
 * @since 2020/11/20 14:00
 */
@Api
@RestController
@RequestMapping("/bussiness/v1")
public class TimerController {

    private BussinessService bussinessService;

    public TimerController(BussinessService bussinessService) {
        this.bussinessService = bussinessService;
    }

    @GetMapping
    @ApiOperation("测试定时任务")
    public BaseResult<?> testTimer(){
        bussinessService.testTimerJob();
        return new BaseResult<>();
    }

}
